home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
dev
/
e
/
Chris_emods.lha
/
myscrollraster.e
< prev
next >
Wrap
Text File
|
1997-08-14
|
744b
|
35 lines
OPT MODULE, REG = 5
MODULE 'graphics/rastport'
-> FOLD myscrollraster(myrp:PTR TO rastport, x, y, x2, y2, deltax, deltay)
EXPORT PROC myscrollraster(rp_ptr:PTR TO rastport, x, y, x2, y2, deltax, deltay)
DEF rpx, rpy, rpx2, rpy2, width, height
IF (deltax >= 0)
rpx := x + deltax
rpx2 := x
width := (-x + x2) - deltax
ELSE
rpx := x
rpx2 := x - deltax
width := (-x + x2) + deltax
ENDIF
IF (deltay >= 0)
rpy := y + deltay
rpy2 := y
height := (-y + y2) - deltay
ELSE
rpy := y
rpy2 := y - deltay
height := (-y + y2) + deltay
ENDIF
ClipBlit(rp_ptr, rpx, rpy,
rp_ptr, rpx2, rpy2,
width, height,
$0C0)
ENDPROC
-> FEND